<h1>Lista de Newsletters</h1>
<table>
	<thead>
		<tr>
			<th>Título</th>
			<th></th>
		</tr>
	</thead>
	<tbody>
		<% unless @newsletters.blank?%>
			<% for newsletter in @newsletters %> 
				<tr>
					<td><%= newsletter.name %></td>
					<td>
						<%= link_to 'Visualizar', :action => 'show', :id => newsletter %> |
						<%= link_to 'Editar', :action => 'edit', :id => newsletter %> |
						<%= link_to 'Enviar', :action => 'deliver', :id => newsletter %> |
						<%= link_to 'Deletar', admin_newsletter_path( newsletter ), :confirm => 'Tem certeza?', :method => :delete %>
					</td>
				</tr>
			<% end %>
		<% else %>
			<tr>
				<td colspan="4">Não há nenhuma newsletter cadastrada no momento</td>
			</tr>
		<% end %>
	</tbody>
</table>

<br/>
<br/>

<%= link_to 'Nova newsletter', :action => 'new' %>